
package net.lab0.fractal.gui;


import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;


@SuppressWarnings("serial")
public class FractalComboboxListRenderer
extends JLabel
implements ListCellRenderer
{
    
    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
    {
        this.removeAll();
        if (value instanceof Class)
        {
            @SuppressWarnings("rawtypes")
            Class clazz = (Class) value;
            this.setText(clazz.getSimpleName());
        }
        return this;
    }
    
}
